const STATUS = {
  0: '已申请',
  1: '注册中',
  2: '正常',
  '-1': '禁止提现'
}
export default {
  FuiouAccount: {
    list: {
      list_filter: {
        'user.username': '用户名/电话号码',
        'outAcntNm': '真实姓名',
        'mobile': '银行绑定手机号',
        status: Object.assign({ __label: '状态' }, STATUS)
      },
      disabled_actions: ['delete'],
      query: {
        '@expands': '["entity.user.balance"]'
      },
      list_display: [
        { property: 'outAcntNm', label: '真实姓名' },
        { property: 'licNo', label: '身份证' },
        { property: 'mobile', label: '手机号' },
        {
          property: 'outAcntNo',
          label: '注册银行卡',
          component: {
            props: ['data'],
            data() {
              return {
                cards: []
              }
            },
            render(h) {
              return <div>{this.data}</div>
            }
          }
        },
        {
          property: 'defaultOutAcntNo',
          label: '提现银行卡',
          component: {
            props: ['data'],
            data() {
              return {
                cards: []
              }
            },
            render(h) {
              if (this.data != null) {
                return <div>{this.data}</div>
              } else {
                return <div>注册银行卡</div>
              }
            }
          }
        },
        { property: 'user', label: '用户' },
        { property: 'user.__metadata.balance.__metadata.amount', label: '钱包余额' },
        {
          property: 'autoWithdraw', label: '自动提现', editable: true
        },
        {
          property: 'status',
          component: {
            props: ['data'],
            data() {
              return {
                status: STATUS
              }
            },
            render(h) {
              return <el-tag>{this.status[this.data]}</el-tag>
            }
          }
        }
      ]
    },
    form: {
      fields: [
        'defaultOutAcntNo'
      ]
    }
  }
}

